package com.jy.api.dao;

import com.jy.api.domain.StockOrder;
import com.jy.api.domain.StockOrderItem;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by xiaohua on 2019/4/20.
 */
public interface StockOrderShopDao extends CrudRepository<StockOrder,String>{





    Page<StockOrder> findAllByStatusInAndEnabledOrderByAddTimeDesc(List<String> list,boolean enabled,Pageable pageable);


    StockOrder findByItems(List<StockOrderItem> orderItems);

    Page<StockOrder> findAllByStatusInAndOrderUserNameAndEnabledOrderByAddTimeDesc(List<String> list,String userName,boolean enabled,Pageable pageable);

}
